import request from '@/utils/request'

// 账号密码登录方法
export function login(data) {
  return request({
    url: '/manager/public/login',
    method: 'post',
    data: data
  })
}

// 获取手机验证码
export function sendCodeLogin(data) {
  return request({
    url: '/manager/public/sendCodeLogin',
    method: 'post',
    data: data
  })
}


// 手机号快件登录
export function phoneLogin(data) {
  return request({
    url: '/manager/public/codeLogin',
    method: 'post',
    data: data
  })
}

// 注册方法
export function register(data) {
  return request({
    url: '/register',
    method: 'post',
    data: data
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/manager/user/myInfo',
    method: 'get'
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/manager/user/logout',
    method: 'post'
  })
}

export function editEmail(data) {
  return request({
    url: '/manage/user/editEmail',
    method: 'post',
    data
  })
}


export function editPassword(data) {
  return request({
    url: '/manager/user/editPass',
    method: 'post',
    data
  })
}

export function sendCodeEditPhone(data) {
  return request({
    url: '/manager/user/sendCodePhone',
    method: 'post',
    data
  })
}

export function editUserInfo(data) {
  return request({
    url: '/manager/user/editMyInfo',
    method: 'post',
    data
  })
}

// export function editPhoto(data) {
//   return request({
//     url: '/manager/user/editMyPhone',
//     method: 'post',
//     data
//   })
// }


export function editPhone(data) {
  return request({
    url: '/manager/user/editMyPhone',
    method: 'post',
    data
  })
}

export function reqAssistRoleBtnList(id) {
  return request({
    url: '/manager/admin_Rbac/getRoleBtnList',
    method: 'get',
    params:id,
  })
}

